
#include <stdio.h>
#include "motorcontroller.h"
#include "batterymonitor.h"
#include <unistd.h>
#include <iostream>
#include "rpi.h"

using namespace std;


int main()
{
  RPi::initialize();

  MotorController mc(RPi::i2cFile());
  //BatteryMonitor bc(RPi::i2cFile());

  double v;
  int i = -1;
  while(true)
  {
    cout << "voltage:  ";
    cin >> v;
    if (v > 1)
    {
      printf("\n\n\n");
      v = v/10;
    }
    mc.setVoltage(-1, v);
    //mc.setVoltage(i, v);
    i++;
    i = i % 4;
  }
  return 0;

}
